#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

typedef long long ll;
typedef double db;
typedef vector < int > vec;
typedef pair < int , int > pii;

int read() {
    int x = 0; bool f = 0; char ch = getchar(); while(!isdigit(ch)) f |= ch == '-',ch = getchar();
    while(isdigit(ch)) x = x * 10 + (ch ^ 48),ch = getchar(); return f ? -x : x;
}

const int N = 510 * 510;

int n, a[N], x[N], id[N], cnt[N];

int main() {
#ifndef ONLINE_JUDGE
    freopen("1.in","r",stdin);
#endif
    n = in; rep(i, 1, n) x[i] = in, id[i] = i, cnt[i] = n;
	sort(id + 1, id + n + 1, [](auto a, auto b) { return x[a] < x[b]; });
	rep(i, 1, n - 1) if(x[id[i]] == x[id[i + 1]]) return puts("No"), 0;
	rep(i, 1, n) {
		int t = id[i], lef = t - 1;
		rep(j, 1, x[t] - 1) {
			if(lef && !a[j]) a[j] = t, cnt[t]--, lef--;
			if(lef == 0) break;
		}
		if(lef) return puts("No"), 0;
		a[x[t]] = t; cnt[t]--;
	}
	int j = 1;
	rep(i, 1, n * n) {
		if(a[i]) continue;
		while(j <= n && cnt[id[j]] == 0) j++;
		cnt[id[j]]--; a[i] = id[j];
	}
	rep(i, 1, n) {
		int t = id[i], tcnt = 0;
		rep(j, 1, x[t]) if(a[j] == t) tcnt++;
		if(tcnt != t) return puts("No"), 0;
	}
	puts("Yes");
	rep(i, 1, n * n) printf("%d ", a[i]); return 0;
}
